﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ShowTravelPlanControl.ascx.cs" Inherits="Control_ShowTravelPlanControl" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<h2>Travel Plan Settings</h2> 


<asp:ToolkitScriptManager ID="ScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
     
    <ContentTemplate> 
        <asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtstartdate">
        </asp:CalendarExtender>   
    <div style="width:950px">
        <a style="margin:0em 0em 0em 0.5em;">Start Location</a><a style="margin:5em 0em 0em 0.5em;">
            <asp:DropDownList ID="dropdownlist1" runat="server" Width="100px">
                <asp:ListItem></asp:ListItem>
            </asp:DropDownList>
        </a>
        <a style="margin:0em 0em 0em 0.5em;">End Location:</a><a style="margin:0em 0em 0em 0.5em;">
            <asp:DropDownList ID="dropdownlist2" runat="server" Width="100px">
                <asp:ListItem></asp:ListItem>
            </asp:DropDownList>
       </a>
       <a style="margin:0em 0em 0em 0.5em;">Date Start:</a><a style="margin:0em 0em 0em 0.5em;">
           
            <asp:TextBox ID="txtstartdate" runat="server" Width="100px" />
        </a>
        <asp:Button ID="btnsearch" runat="server" Text="Search" 
            onclick="btnsearch_Click" />
        <asp:Label ID="lblnull" runat="server" Text="Not Found The Value" 
            BorderColor="#CC0000" ForeColor="#CC0000" Visible="False"></asp:Label>
    </div>
    <table id="rounded-corner">
        <tr>
        	<th scope="col" class="rounded-company"></th>
            <th scope="col" class="rounded">Start Location</th>
            <th scope="col" class="rounded">End Location</th>
            <th scope="col" class="rounded">Date Plan</th>
            <th scope="col" class="rounded">Time Plate</th>
            <th scope="col" class="rounded">Edit</th>
            <th scope="col" class="rounded-q4">Delete</th>
        </tr>

<asp:ListView ID="ListView1" runat="server" ItemPlaceholderID="IdLocation" DataKeyNames="IdLocation">
    <ItemTemplate>
        <tr>
        	<td><input type="checkbox" name="idlocation" value="<%# Eval("IdLocation") %>"/></td>
            <td><%# Eval("StartLocation")%></td>
            <td><%# Eval("EndLocation")%></td>
            <td><%# Eval("DateStart")%></td>
            <td><%# Eval("TimePlan")%></td>
            
            
            <td><a href="../Admin/UpdateTravelPlan_Admin.aspx?idlo=<%# Eval("IdLocation") %>&startLo=<%# Eval("StartLocation") %>&Endlo=<%# Eval("EndLocation") %>&date=<%# Eval("DateStart") %>&time=<%# Eval("TimePlan") %>"><img src="../Images/user_edit.png" alt="" title="" border="0" /></a></td>
            <td><a href="../Admin/DeleteTravelPlan_Admin.aspx?idlo=<%# Eval("IdLocation") %>" class="ask"><img src="../Images/trash.png" alt="" title="" border="0" /></a></td>
        </tr>
    </ItemTemplate>
    <LayoutTemplate>
        <asp:PlaceHolder runat="server" ID="IdLocation"></asp:PlaceHolder>
    </LayoutTemplate>
</asp:ListView> 
</table>
        
	 <a href="../Admin/AddTravelPlan_Admin.aspx" class="bt_green"><span class="bt_green_lft"></span><strong>Add new item</strong><span class="bt_green_r"></span></a>
     
     <a href="#" class="bt_red"><span class="bt_red_lft"></span><strong>Delete items</strong><span class="bt_red_r"></span></a> 
     

     <div class="pagination">
         <asp:DataPager ID="DataPagerForAlbums" runat="server" PagedControlID="ListView1" PageSize="5">
                <Fields>
                    <asp:NextPreviousPagerField ShowFirstPageButton="True" FirstPageText="&laquo prev" ShowNextPageButton="False"  ShowPreviousPageButton="false" />
                    <asp:NumericPagerField />
                    <asp:NextPreviousPagerField ShowLastPageButton="True" LastPageText="&raquo next" ShowPreviousPageButton="False"  ShowNextPageButton="false" />
                </Fields>
         </asp:DataPager>
     </div>
        
        </p>
    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="DataPagerForAlbums" />
    </Triggers>
</asp:UpdatePanel>

